Regarding focus detection apparatuses for detecting a focus state of an image-forming optical system, Japanese Patent Laid-Open No. 58-24105 discloses an apparatus that performs pupil division focus detection using a two-dimensional image sensor (image pickup element) having a micro-lens formed in each pixel. In the apparatus disclosed in Japanese Patent Laid-Open No. 58-24105, a photoelectric converting part in each pixel of the image sensor is divided into plural portions, and the divided plural portions of the photoelectric converting part receive, through the micro-lens, light fluxes passing through mutually different areas of a pupil of the image-forming optical system.
Moreover, Japanese Patent Laid-Open No. 2005-106994 discloses an image pickup apparatus that performs the pupil division focus detection using a CMOS sensor which is a type of the image sensors. In the apparatus disclosed in Japanese Patent Laid-Open No. 2005-106994, part of a large number of pixels included in the CMOS sensor has a structure in which a photoelectric converting part is divided into two in order to detect a focus state of an image-taking (image-forming) optical system. The two-divided portions of the photoelectric converting part receive, through a micro-lens, light fluxes passing through mutually different areas in a pupil of the image-taking optical system.
The pupil division focus detection performs correlation calculation on image signals obtained by the photoelectric conversion of an A-image and a B-image respectively formed by the light fluxes passing through the mutually different areas (an A-pupil area and a B-pupil area) in the pupil of the image-forming optical system to calculate a phase difference of the A- and B-images, and calculates a defocus amount of the image-forming optical system on the basis of the phase difference.
Regarding the correlation calculation for the image signals obtained by the photoelectric conversion of the A- and B-images, Japanese Patent Laid-Open No. 5-127074 discloses a method that transforms a specific filter according to an aperture ratio of the image-forming optical system, an exit pupil position or a phase difference amount, and performs a filtering process on the image signals using the transformed filter.
The focus detection of the image-forming optical system is generally capable of detecting a focus state not only for an object located in a central part of an image pickup area (image-capturing frame), but also for an object located in a marginal part thereof. However, in the marginal part, the A- and B-pupil areas may be asymmetric with each other due to light flux vignetting caused by an optical element holding member that holds an optical element such as a lens constituting part of the image-forming optical system. Such asymmetry of the A- and B-pupil areas reduces a degree of coincidence between the A- and B-images, which deteriorates focus detection accuracy.
In order to suppress such reduction of the degree of coincidence between the A- and B-images, Japanese Patent Laid-Open No. 2010-117679 discloses a method that performs image restoration according to a vignetting state by convolution of the A-image with a line image corresponding to the B-pupil area and convolution of the B-image with a line image corresponding to the A-pupil area.
However, in the image restoration method disclosed in Japanese Patent Laid-Open No. 2010-117679, the convolution with the line image of each pupil area decreases sharpness of the A- and B-images after the restoration as compared with the A- and B-images before the restoration. The decrease of the sharpness may deteriorate focus detection accuracy in cases of performing image capturing for a low contrast object, having a large defocus amount and setting a small (bright) aperture value.